function [ZCseq] = Function_Generate_ZC_Seq(q, N_ZC)
% ZC_seq Generate the q-th root Zadoff-Chu sequence of length N_ZC
%              corresponding to N_PRB RBs and one slot
% Inputs:      q                        - root of sequence (non-negative integer)
%              N_ZC                     - Lentgh of sequqnce (prime integer)
% Outputs:     ZCseq                    - complex-valued ZC sequqnece
% Spec:        3GPP TS 36.211 section 5.5.1 v13.0.0
            
    ZCseq = zeros(1,N_ZC); %allocate memory
	for m = 0:N_ZC-1
        ZCseq(m+1) = exp( -1i * pi * q * m * (m+1) / N_ZC);
	end
end